Next: Major Display Modes, Up: Extending [Contents][Index]
A minor display mode is a mode useful when using a specific type of buffer. This mode might not be useful for any other kind of data or mode, or may just be more useful that a files or buffers based mode when working with a specialized mode.
Examples that already exist for speedbar include RMAIL, Info, and gdb. These modes display information specific to the major mode shown in the attached frame.
To enable a minor display mode in your favorite Major mode, follow these steps. The string ‘name’ is the name of the major mode being augmented with speedbar.
name-speedbar-key-map.
(setq name-speedbar-key-map (speedbar-make-specialized-keymap))
This function creates a special keymap for use in speedbar.
(if (featurep 'speedbar)
(name-install-speedbar-variables)
(add-hook 'speedbar-load-hook 'name-install-speedbar-variables))
name-speedbar-menu-items. This will be
spliced into speedbar’s control menu.name-speedbar-buttons. This function
should take one variable, which is the buffer for which it will
create buttons. At this time (current-buffer) will
point to the uncleared speedbar buffer.When writing name-speedbar-buttons,
the first thing you will want to do is execute a check to see if
you need to re-create your display. If it needs to be cleared,
you need to erase the speedbar buffer yourself, and start drawing
buttons. See Creating a
display.
Next: Major Display Modes, Up: Extending [Contents][Index]